package com.zx.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;

import java.util.ArrayList;

public class OOMController {
    @GetMapping("/oom")
    public void oom(){
        ArrayList<OOMController> list = new ArrayList<>();

        int count = 0;
        try{
            while(true){
                list.add(new OOMController());
                count++;
            }
        }catch (Throwable e){
            System.out.println("count = " + count);
            e.printStackTrace();
        }
    }
}
